import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';

import { aroAnimation } from '../../../animation';

@Component({
  selector: 'app-settings',
  templateUrl: './settings.component.html',
  styleUrls: ['./settings.component.css'],
  animations: [aroAnimation]
})
export class SettingsComponent implements OnInit {

  public readerId: string = localStorage.getItem('ReaderId');

  constructor(private location: Location, private currentRouter: ActivatedRoute, private router: Router) { }

  ngOnInit() {
  }


  public goBack(): void {
    this.location.back();
  }

  public logOut_onclick() {
    localStorage.removeItem('ReaderId');
    this.router.navigate(['./content/user']);
  }

  public resetPassword_onclick(): void {
    this.router.navigate(['./reset']);
  }

}
